

**Codes to replicate the tables and figures 

use "data.dta"

***Figure 1: Testing H1 with the treatment of historical ownership ("unsure" answers removed)
 
ttest q103_1 if q103_1 < 2, by (historical) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (historical) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (historical) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (historical) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (historical) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Historically Unoccupied) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Historically Owned by China) ),  ///
 coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 4.6059" "(N = 1,934)" "' b = `" "t = -0.8939" "(N = 1,833)" "' ///
 c = `" "t = 2.2530" "(N = 1,946)" "' d = `" "t = 1.4311" "(N = 977)" "' ///
 e = `" "t = 1.6192" "(N = 929)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	

**combining the two treatments with sidepayments

gen side = q103_10
replace side = q103_11 if side ==.
ttest side if side < 2, by (historical) 
 
 
**Figure 2: looking at military strength of the neighboring country ("unsure" answers removed)


ttest q103_1 if q103_1 < 2, by (powerful) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (powerful) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (powerful) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (powerful) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (powerful) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Militarily Weak) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Militarily Strong) ),  ///
coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 0.4387" "(N = 1,934)" "' b = `" "t = 0.2605" "(N = 1,833)" "' ///
 c = `" "t = 0.06050" "(N = 1,946)" "' d = `" "t = 0.9519" "(N = 977)" "' ///
 e = `" "t = 2.6252" "(N = 929)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	


**Figure 1 in Appendix A: looking at value of the territory

ttest q103_1 if q103_1 < 2, by (valuable) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (valuable) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (valuable) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (valuable) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (valuable) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Value Unsure) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Valuable) ),  ///
 coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 1.9407" "(N = 1,934)" "' b = `" "t = -1.2330" "(N = 1,833)" "' ///
 c = `" "t = 0.1055" "(N = 1,946)" "' d = `" "t = 0.2368" "(N = 977)" "' ///
 e = `" "t = -0.5850" "(N = 929)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	


**Figure 2 in Appendix A: looking at island vs. land

ttest q103_1 if q103_1 < 2, by (island) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (island) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (island) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (island) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (island) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Land) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Island) ),  ///
 coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 1.2328" "(N = 1,934)" "' b = `" "t = -1.1833" "(N = 1,833)" "' ///
 c = `" "t = 0.9536" "(N = 1,946)" "' d = `" "t = 0.1049" "(N = 977)" "' ///
 e = `" "t = -0.2120" "(N = 929)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	
 

**mean comparisons of the hardcore indivisible group vs. others (Table 1)


ttest hardcore, by(historical)
ttest hardcore, by(powerful)
ttest hardcore, by(valuable)
ttest hardcore, by(island)

ttest hardcore4, by(historical)
ttest hardcore4, by(powerful)
ttest hardcore4, by(valuable)
ttest hardcore4, by(island)

**

//hypothesis 2: conditional on nationalism (Table 2)


gen c_nat = nationalism - 0.8039815
label variable c_nat "Natinalism"

gen hist_c_nat = historical*c_nat
label variable hist_c_nat "Historical Ownership x Nationalism"

logit hardcore c_nat historical hist_c_nat 
outreg2 using conditional, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex replace

logit hardcore c_nat historical hist_c_nat age han male eastern central rural college SOE ccp income socialstatus news defense
outreg2 using conditional, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append
 
 
//Hypothesis 3: policy preferences 

**table 3

logit q100_1 hardcore historical if q100_1 > -1
logit q100_1 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_1 > -1
estimates store o1
outreg2 using model3, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) replace
*outtex, detail level below title(Dep = `e(depvar)') file(model3) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat1 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat2 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff1
matrix drop t


logit q100_2 hardcore historical if q100_2 > -1
logit q100_2 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_2 > -1
estimates store o2
outreg2 using model3, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat3 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat4 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff2
matrix drop t

logit q100_4 hardcore historical if q100_4 > -1
logit q100_4 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_4 > -1
estimates store o3
outreg2 using model3, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat5 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat6 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff3
matrix drop t

logit q100_5 hardcore historical if q100_5 > -1
logit q100_5 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_5 > -1
estimates store o4
outreg2 using model3, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat7 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat8 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff4
matrix drop t

logit q100_6 hardcore historical if q100_6 > -1
logit q100_6 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_6 > -1
estimates store o5
outreg2 using model3, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat9 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat10 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff5
matrix drop t

logit q100_7 hardcore if q100_7 > -1
logit q100_7 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_7 > -1
estimates store o6
outreg2 using model3, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append
outtex, lab detail level below title(Dep = `e(depvar)') file(model3) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat11 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat12 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff6
matrix drop t

*coefplot o1 || o2 || o3
 *drop(_cons) xline(0) xtitle(Log Odds of Hardcore Indivisible)  
 
matrix t1 = mat1\mat3\mat5\mat7\mat9\mat11
matrix rownames t1 = a b c d e f

matrix t2 = mat2\mat4\mat6\mat8\mat10\mat12
matrix rownames t2 = a b c d e f


**Figure 3

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") ), bylabel(Compromise Possible) || ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") ), bylabel(Territory Indivisible)  ||, ///
 coeflabel(a = `" "Publicity" "(p = 0.467)" "' ///
           b = `" "Economic Sanction" "(p < 0.001)" "' ///
           c = `" "Bilateral Negotiation" "(p < 0.001)" "' ///
           d = `" "IO Arbitration" "(p < 0.001)" "' ///
           e = `" "Table the Dispute" "(p < 0.001)" "' ///
           f = `" "Military Action" "(p < 0.001)" "') ///
mlabel format(%9.2g) mlabposition(1) graphregion(color(white))	


**Figure 4: see R code

*******************
*  Appendix
******************* 
 
***Appendix B: descriptive stats
 
estpost su age han male eastern central rural college SOE ccp income socialstatus news defense nationalism1-nationalism5 nationalism
est store desc
esttab desc using desc.tex, ///
  mtitle("Observation" "Mean" "Standard Deviation" "Minimum" "Maximum") ///
  replace cells(count mean(fmt(2)) sd(fmt(2)) min max) label booktabs nonum collabels(none) gaps noobs

***Appendix C: Randomizatino check/balance test

estpost su age han male eastern central rural college SOE ccp income socialstatus news defense nationalism1-nationalism5 nationalism if historical==0
est store historical0
estpost su age han male eastern central rural college SOE ccp income socialstatus news defense nationalism1-nationalism5 nationalism if historical==1
est store historical1 

esttab historical0 historical1 using bal.tex, ///
  mtitle("Yes" "No") ///
  replace cells( mean(fmt(2)) ) label booktabs nonum collabels(none) gaps noobs
 
**Appendix D: combining unacceptable with unsure

replace q103_1 = 0 if q103_1 == 2
replace q103_6 = 0 if q103_6 == 2
replace q103_9 = 0 if q103_9 == 2
replace q103_10 = 0 if q103_10 == 2
replace q103_11 = 0 if q103_11 == 2

//historical

ttest q103_1 if q103_1 < 2, by (historical) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))
*matrix m1 = (r(mu_2)-r(mu_1), r(mu_2)-r(mu_1)-1.96*(r(se)), r(mu_2)-r(mu_1)+1.96*(r(se)))

ttest q103_6 if q103_6 < 2, by (historical) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))
*matrix m2 = (r(mu_2)-r(mu_1), r(mu_2)-r(mu_1)-1.96*(r(se)), r(mu_2)-r(mu_1)+1.96*(r(se)))

ttest q103_9 if q103_9 < 2, by (historical) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))
*matrix m3 = (r(mu_2)-r(mu_1), r(mu_2)-r(mu_1)-1.96*(r(se)), r(mu_2)-r(mu_1)+1.96*(r(se)))

ttest q103_10 if q103_10 < 2, by (historical) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))
*matrix m4 = (r(mu_2)-r(mu_1), r(mu_2)-r(mu_1)-1.96*(r(se)), r(mu_2)-r(mu_1)+1.96*(r(se)))

ttest q103_11 if q103_11 < 2, by (historical) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))
*matrix m5 = (r(mu_2)-r(mu_1), r(mu_2)-r(mu_1)-1.96*(r(se)), r(mu_2)-r(mu_1)+1.96*(r(se)))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

*matrix t3 = m1\m2\m3\m4\m5
*matrix rownames t3 = a b c d e


coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Historically Unoccupied) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Historically Owned by China) ),  ///
 coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 4.3281" "(N = 2,160)" "' b = `" "t = -1.9895" "(N = 2,160)" "' ///
 c = `" "t = 1.9234" "(N = 2,160)" "' d = `" "t = 1.1491" "(N = 1,097)" "' ///
 e = `" "t = 1.5164" "(N = 1,063)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	 

*coefplot (matrix(t3[.,1]), ci("t3[.,2] t3[.,3]")), ///
*  coeflabel(a = "Sharing Sovereignty and Right to Use" ///
*           b = "China has Sovereignty and Right to Use" ///
*           c = "China has Sovereignty but Co-development" ///
*           d = "Side-Payment with IO" ///
*           e = "Side-Payment without IO") ///
*mlabel format(%9.2g) mlabposition(1) xline(0) 

//looking at power


ttest q103_1 if q103_1 < 2, by (powerful) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (powerful) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (powerful) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (powerful) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (powerful) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Militarily Weak) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Militarily Strong) ),  ///
coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 0.5991" "(N = 2,160)" "' b = `" "t = -0.1366" "(N = 2,160)" "' ///
 c = `" "t = 0.0715" "(N = 2,160)" "' d = `" "t = 0.9043" "(N = 1,097)" "' ///
 e = `" "t = 3.1082" "(N = 1,063)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	


//looking at value

ttest q103_1 if q103_1 < 2, by (valuable) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (valuable) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (valuable) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (valuable) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (valuable) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Value Unsure) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Valuable) ),  ///
 coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 2.0912" "(N = 2,160)" "' b = `" "t = -0.0026" "(N = 2,160)" "' ///
 c = `" "t = -0.1667" "(N = 2,160)" "' d = `" "t = -0.1064" "(N = 1,097)" "' ///
 e = `" "t = -0.6124" "(N = 1,063)" "', nogap angle(horizontal)) yscale(alt axis(2))  graphregion(color(white))	


//island vs. land

ttest q103_1 if q103_1 < 2, by (island) 
matrix mat1 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat2 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_6 if q103_6 < 2, by (island) 
matrix mat3 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat4 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_9 if q103_9 < 2, by (island) 
matrix mat5 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat6 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_10 if q103_10 < 2, by (island) 
matrix mat7 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat8 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

ttest q103_11 if q103_11 < 2, by (island) 
matrix mat9 = (r(mu_1), r(mu_1)-1.96*(r(sd_1)/sqrt(r(N_1))), r(mu_1)+1.96*(r(sd_1)/sqrt(r(N_1))))
matrix mat10 = (r(mu_2), r(mu_2)-1.96*(r(sd_2)/sqrt(r(N_2))), r(mu_2)+1.96*(r(sd_2)/sqrt(r(N_2))))

matrix t1 = mat1\mat5\mat7\mat9\mat3
matrix rownames t1 = a c d e b

matrix t2 = mat2\mat6\mat8\mat10\mat4
matrix rownames t2 = a c d e b

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Land) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Island) ),  ///
 coeflabel(a = `" "Sharing Sovereignty" "and Right to Use" "' ///
 		   b = `" "China has Sovereignty" "and Right to Use" "' ///
           c = `" "China has Sovereignty" "but Co-development" "' ///
           d = `" "Side-Payment with IO" "' ///
           e = `" "Side-Payment without IO" "' ) ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Proportion of Support) legend(size(small)) ///
groups(a = `" "t = 1.0835" "(N = 2,160)" "' b = `" "t = -0.5986" "(N = 2,160)" "' ///
 c = `" "t = 0.7814" "(N = 2,160)" "' d = `" "t = 0.0368" "(N = 1,097)" "' ///
 e = `" "t = ?0.1296" "(N = 1,063)" "', nogap angle(horizontal)) yscale(alt axis(2)) graphregion(color(white))	

**Appendix E: testing H3 by including the "unsure" category

replace q100_1 = 0 if q100_1 == -1
replace q100_2 = 0 if q100_2 == -1
replace q100_4 = 0 if q100_4 == -1
replace q100_5 = 0 if q100_5 == -1
replace q100_6 = 0 if q100_6 == -1
replace q100_7 = 0 if q100_7 == -1

logit q100_1 hardcore historical if q100_1 > -1
logit q100_1 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_1 > -1
estimates store o1
outreg2 using model3b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) replace
*outtex, detail level below title(Dep = `e(depvar)') file(model3) long replace
prchange
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat1 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat2 = (t[1,7], t[1,8], t[1,9])
matrix drop t

logit q100_2 hardcore historical if q100_2 > -1
logit q100_2 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_2 > -1
estimates store o2
outreg2 using model3b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat3 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat4 = (t[1,7], t[1,8], t[1,9])
matrix drop t

logit q100_4 hardcore historical if q100_4 > -1
logit q100_4 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_4 > -1
estimates store o3
outreg2 using model3b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat5 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat6 = (t[1,7], t[1,8], t[1,9])
matrix drop t

logit q100_5 hardcore historical if q100_5 > -1
logit q100_5 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_5 > -1
estimates store o4
outreg2 using model3b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat7 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat8 = (t[1,7], t[1,8], t[1,9])
matrix drop t

logit q100_6 hardcore historical if q100_6 > -1
logit q100_6 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_6 > -1
estimates store o5
outreg2 using model3b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat9 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat10 = (t[1,7], t[1,8], t[1,9])
matrix drop t

logit q100_7 hardcore if q100_7 > -1
logit q100_7 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_7 > -1
estimates store o6
outreg2 using model3b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append
*outtex, lab detail level below title(Dep = `e(depvar)') file(model3b) long replace
prchange
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat11 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat12 = (t[1,7], t[1,8], t[1,9])
matrix drop t
 
matrix t1 = mat1\mat3\mat5\mat7\mat9\mat11
matrix rownames t1 = a b c d e f

matrix t2 = mat2\mat4\mat6\mat8\mat10\mat12
matrix rownames t2 = a b c d e f
 
coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") label(Compromise Possible) ) ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") label(Territory Indivisible) ),  ///
 coeflabel(a = "Publicity" ///
           b = "Economic Sanction" ///
           c = "Compromise through Negotiation" ///
           d = "IO Arbitration" ///
           e = "Table the Dispute" ///
           f = "Military Action") ///
mlabel format(%9.2g) mlabposition(1) ///
xtitle(Predicted Probability of Support) 

**Appendix F: regression analysis for H1

logit q103_1 historical powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense nationalism if q103_1 < 2
estimates store p1
outreg2 using model1b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) replace
                                                  
logit q103_9 historical powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense nationalism if q103_9 < 2
estimates store p3
outreg2 using model1b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append

logit q103_10 historical powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense nationalism if q103_10 < 2
estimates store p4
outreg2 using model1b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append

logit q103_11 historical powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense nationalism if q103_11 < 2
estimates store p5
outreg2 using model1b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append 

logit q103_6 historical powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense nationalism if q103_6 < 2
estimates store p2
outreg2 using model1b, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append

**Appendix G: See R code

**Appendix H: See R code

   
***Appendix I: Derivation and Diagnostics of the IRT Measure

irt 1pl a1-a4
estat report, sort(b) byparm
irtgraph icc, blocation legend(on) xlabel(,alt) graphregion(color(white))	
irtgraph tcc, scorelines(1 2 3) graphregion(color(white))	
predict Theta, latent
preserve
collapse a1-a4, by(Theta)
irtgraph icc a1, addplot(scatter a1 Theta) title("Share Sovereignty and Right to Use") graphregion(color(white))	
graph save Graph "1pl_a1.gph", replace
irtgraph icc a2, addplot(scatter a2 Theta) title("China Has Sovereignty and Right to Use") graphregion(color(white))	
graph save Graph "1pl_a2.gph", replace
irtgraph icc a3, addplot(scatter a3 Theta) title("China Has Sovereignty but Share Right to Use") graphregion(color(white))	
graph save Graph "1pl_a3.gph", replace
irtgraph icc a4, addplot(scatter a4 Theta) title("Side−Payment") graphregion(color(white))	
graph save Graph "1pl_a4.gph", replace
restore

graph combine "1pl_a1.gph" "1pl_a2.gph" "1pl_a3.gph" "1pl_a4.gph", imargin(zero) graphregion(color(white))	

irt 2pl a1-a4, intpoints(5)
estat report, byparm sort(b)
irtgraph icc, blocation xlabel(, alt) graphregion(color(white))	
irtgraph tcc, thetalines(1 2 3) graphregion(color(white))	
predict hardcore4, latent 
 
**Appendix J: real disputes in mind

tab country

//Hypothesis 3: policy preferences 

**japan

logit q100_1 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_1 > -1 & japan==1
estimates store a1
outreg2 using japan, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) replace
*outtex, detail level below title(Dep = `e(depvar)') file(model3) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat1 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat2 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff1
matrix drop t


logit q100_2 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_2 > -1  & japan==1
estimates store a2
outreg2 using japan, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat3 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat4 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff2
matrix drop t

logit q100_4 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_4 > -1  & japan==1
estimates store a3
outreg2 using japan, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat5 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat6 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff3
matrix drop t

logit q100_5 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_5 > -1 & japan==1
estimates store a4
outreg2 using japan, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat7 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat8 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff4
matrix drop t

logit q100_6 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_6 > -1 & japan==1
estimates store a5
outreg2 using japan, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat9 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat10 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff5
matrix drop t

logit q100_7 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_7 > -1 & japan==1
estimates store a6
outreg2 using japan, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append
*outtex, lab detail level below title(Dep = `e(depvar)') file(japan) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat11 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat12 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff6
matrix drop t

*coefplot o1 || o2 || o3
 *drop(_cons) xline(0) xtitle(Log Odds of Hardcore Indivisible)  


 
matrix t1 = mat1\mat3\mat5\mat7\mat9\mat11
matrix rownames t1 = a b c d e f

matrix t2 = mat2\mat4\mat6\mat8\mat10\mat12
matrix rownames t2 = a b c d e f

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") ), bylabel(Compromise Possible) || ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") ), bylabel(Territory Indivisible)  ||, ///
 coeflabel(a = "Publicity" ///
           b = "Economic Sanction" ///
           c = "Compromise through Negotiation" ///
           d = "IO Arbitration" ///
           e = "Table the Dispute" ///
           f = "Military Action") ///
mlabel format(%9.2g) mlabposition(1) 

**philippines

logit q100_1 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_1 > -1 & phil==1
estimates store b1
outreg2 using phil, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) replace
*outtex, detail level below title(Dep = `e(depvar)') file(model3) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat1 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat2 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff1
matrix drop t


logit q100_2 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_2 > -1  & phil==1
estimates store b2
outreg2 using phil, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat3 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat4 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff2
matrix drop t

logit q100_4 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_4 > -1  & phil==1
estimates store b3
outreg2 using phil, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat5 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat6 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff3
matrix drop t

logit q100_5 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_5 > -1 & phil==1
estimates store b4
outreg2 using phil, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat7 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat8 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff4
matrix drop t

logit q100_6 hardcore historical nationalism powerful valuable island age han male eastern central rural college SOE ccp income socialstatus news defense if q100_6 > -1 & phil==1
estimates store b5
outreg2 using phil, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat9 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat10 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff5
matrix drop t

logit q100_7 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_7 > -1 & phil==1
estimates store b6
outreg2 using phil, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append
*outtex, lab detail level below title(Dep = `e(depvar)') file(japan) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat11 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat12 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff6
matrix drop t

*coefplot o1 || o2 || o3
 *drop(_cons) xline(0) xtitle(Log Odds of Hardcore Indivisible)  


 
matrix t1 = mat1\mat3\mat5\mat7\mat9\mat11
matrix rownames t1 = a b c d e f

matrix t2 = mat2\mat4\mat6\mat8\mat10\mat12
matrix rownames t2 = a b c d e f

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") ), bylabel(Compromise Possible) || ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") ), bylabel(Territory Indivisible)  ||, ///
 coeflabel(a = "Publicity" ///
           b = "Economic Sanction" ///
           c = "Compromise through Negotiation" ///
           d = "IO Arbitration" ///
           e = "Table the Dispute" ///
           f = "Military Action") ///
mlabel format(%9.2g) mlabposition(1) 

**Vietnam

logit q100_1 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_1 > -1 & vietnam==1
estimates store c1
outreg2 using vietnam, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) replace
*outtex, detail level below title(Dep = `e(depvar)') file(model3) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat1 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat2 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff1=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff1
matrix drop t


logit q100_2 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_2 > -1  & vietnam==1
estimates store c2
outreg2 using vietnam, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat3 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat4 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff2=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff2
matrix drop t

logit q100_4 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_4 > -1  & vietnam==1
estimates store c3
outreg2 using vietnam, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat5 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat6 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff3=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff3
matrix drop t

logit q100_5 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_5 > -1 & vietnam==1
estimates store c4
outreg2 using vietnam, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat7 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat8 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff4=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff4
matrix drop t

logit q100_6 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_6 > -1 & vietnam==1
estimates store c5
outreg2 using vietnam, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) append
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat9 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat10 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff5=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff5
matrix drop t

logit q100_7 hardcore historical nationalism powerful valuable island age male eastern central rural college SOE ccp income socialstatus news defense if q100_7 > -1 & vietnam==1
estimates store c6
outreg2 using vietnam, lab excel 2aster addstat(Pseudo R-squared, `e(r2_p)', LR $\chi^2$, e(chi2), Prob < $\chi^2$, e(p)) tex append
*outtex, lab detail level below title(Dep = `e(depvar)') file(japan) long replace
prchange hardcore, rest(median)
estadd prvalue, x(hardcore=0 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat11 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=1 ) rest(grmedian) replace
matrix t = e(_estadd_prvalue)
matrix mat12 = (t[1,7], t[1,8], t[1,9])
matrix drop t
estadd prvalue, x(hardcore=0 ) rest(grmedian) save delta
estadd prvalue, x(hardcore=1 ) rest(grmedian) dif delta
ereturn list
matrix t = e(_estadd_prvalue)
matrix list t
*matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 2*(1-normprob(abs(t[3, 12])))) /*Two-tail*/
matrix Diff6=(t[3, 7],t[3, 8],t[3, 9], 1-normprob(abs(t[3, 12])))
matrix list Diff6
matrix drop t

*coefplot o1 || o2 || o3
 *drop(_cons) xline(0) xtitle(Log Odds of Hardcore Indivisible)  


 
matrix t1 = mat1\mat3\mat5\mat7\mat9\mat11
matrix rownames t1 = a b c d e f

matrix t2 = mat2\mat4\mat6\mat8\mat10\mat12
matrix rownames t2 = a b c d e f

coefplot (matrix(t1[.,1]), ci("t1[.,2] t1[.,3]") ), bylabel(Compromise Possible) || ///
 (matrix(t2[.,1]), ci("t2[.,2] t2[.,3]") ), bylabel(Territory Indivisible)  ||, ///
 coeflabel(a = "Publicity" ///
           b = "Economic Sanction" ///
           c = "Compromise through Negotiation" ///
           d = "IO Arbitration" ///
           e = "Table the Dispute" ///
           f = "Military Action") ///
mlabel format(%9.2g) mlabposition(1) 


**only plotting coefficient of indivisibility	  
coefplot (a1, label(Japan) m(Oh)) (b1, label(Philippines) m(Sh)) (c1, label(Vietnam) m(Th)), bylabel(Publicity) ///
	  || a2 b2 c2, bylabel(Economic Sanction) ///
      || a3 b3 c3, bylabel(Bilateral Negotiation) ///
	  || a4 b4 c4, bylabel(IO Arbitration) ///
	  || a5 b5 c5, bylabel(Shelving the Dispute) ///
	  || a6 b6 c6, bylabel(Military Action) ///
	  ||, keep(hardcore) xline(0) graphregion(color(white))	  


coefplot a1, bylabel(Publicity) ///
	  || a2, bylabel(Economic Sanction) ///
      || a3, bylabel(Bilateral Negotiation) ///
	  || a4, bylabel(IO Arbitration) ///
	  || a5, bylabel(Shelving the Dispute) ///
	  || a6, bylabel(Military Action) ///
	  ||, keep(hardcore) xline(0) graphregion(color(white))	
	  



